<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/blog/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="/blog/css/global.css"/>
</head>
<body>

<div class="layui-header" th:fragment="nav(n)">
    <ul class="layui-nav" th:align="center">
        <li class="layui-nav-item" th:classappend="${n==1} ? 'layui-this'"><a href="javascript:;" th:href="@{/index/1}"><i class="home icon"></i>首页</a></li>
        <li class="layui-nav-item" th:classappend="${n==2} ? 'layui-this'"><a href="javascript:;" th:href="@{/articleList/1}"><i class="file outline icon"></i>文章专栏</a></li>
        <li class="layui-nav-item" th:classappend="${n==3} ? 'layui-this'"><a href="javascript:;" th:href="@{/archives}"><i class="folder open outline icon"></i>内容归档</a></li>
        <li class="layui-nav-item" th:classappend="${n==4} ? 'layui-this'"><a href="javascript:;"><i class="list icon"></i>资源分享</a></li>
        <li class="layui-nav-item" th:classappend="${n==5} ? 'layui-this'"><a href="javascript:;" th:href="@{/timeLine}"><i class="paper plane outline icon"></i>日志</a></li>
        <li class="layui-nav-item"><a href="javascript:;"><i class="info icon"></i>关于我</a></li>
    </ul>
    <ul class="layui-nav layui-layout-right layui-nav-right">
        <li class="layui-nav-item" th:classappend="${n==8} ? 'layui-this'" th:unless="${user} != ''">
            <a href="javascript:;" th:href="@{/login}">登录</a>
        </li>
<!--        <li class="layui-nav-item"><a href="javascript:;">注册</a></li>-->
        <li class="layui-nav-item" th:if="${user} != ''">
            <a href="javascript:;" th:text="${user}" id="user"></a>
            <dl class="layui-nav-child">
                <dd><a href="javascript:;" onclick="logout()">退出登录</a></dd>
            </dl>
        </li>
    </ul>
</div>

<!-- 中间内容底部的翻页效果开始 --->
<div class="ui bottom attached segment" th:fragment="page">
    <div class="ui middle aligned three column grid">
        <div class="column">
            <a href="javascript:;" th:href="@{${pageBean.url}+'/'+${pageBean.currentPage-1}+${pageBean.condition}}" th:if="${pageBean.currentPage}>'1'" class="ui mini teal basic button">上一页</a>
        </div>
        <div class="center column" align="center" th:text="${pageBean.currentPage}+'/'+${pageBean.pageCount}"></div>
        <div class="right aligned column">
            <a href="javascript:;"  th:href="@{${pageBean.url}+'/'+${pageBean.currentPage+1}+${pageBean.condition}}" th:if="${pageBean.currentPage}<${pageBean.pageCount}" class="ui mini teal basic button">下一页</a>
        </div>
    </div>
</div>
<!-- 中间内容底部的翻页效果结束 --->

<div class="footer" th:fragment="footer">
    <p>Copyright &copy; 2021 Design By LMJ</p>
    <p>备案号:XXXXX</p>
</div>

<script src="/blog/dist/jquery/jquery-3.4.1.min.js"></script>
<script src="/blog/js/global.js"></script>
<script>
</script>

</body>
</html>